package com.yunwuliu.eunm;

import com.yunwuliu.bean.IResult;
import lombok.AllArgsConstructor;
import lombok.Setter;

/**
 *
 * @author lwk
 * @date 2018年7月26日
 */
@AllArgsConstructor
public enum ResultEnum implements IResult {
    SUCCESS(200,"接口调用成功"),
    COMMON_ERROR(500,"接口调用失败"),
    VALID_ERROR(501,"参数验证失败"),
    FORBIDDEN_ERROR(403,"权限不足");



    /**
     * @return
     */
    @Override
    public Integer getCode() {
        return code;
    }

    /**
     * @return
     */
    @Override
    public String getMsg() {
        return msg;
    }

    private Integer code;
    private String msg;

    public void setCode(Integer code) {
        this.code = code;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
